<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    //流程：顺序、分支
    //判断：if,if...else...,if...else... if...else...
    //比较两个数大小,大小相等的情况打印num1和num2相等
    let num1,num2;
    num1 = prompt();
    num2 = prompt();
    //判断两个值的大小
    if(num1>num2){
        console.log('num1大于num2');
    }
    else if(num1==num2){
        console.log('num1等于num2');
    }else{
        console.log('num1小于num2');
    }
    //分数>=90甲等，90>分数>=80乙等，80>分数>=60丙等，60>分数不及格
    let score = prompt();
    if(score>=90){
        console.log('甲等');
    }else if(90>score>=80){
        console.log('乙等');
    }else if(80>score>=60){
        console.log('丙等');
    }else{
        console.log('不合格');
    }

    //swich...case
    //对输入的值（0~5）进行判定，将输入的值转换为二进制
    let num = 3;
    switch(num){
        case 0:
            console.log('转化为二进制是0000')；
            break;
        case 1:
            console.log('0001');
            break;
         case 2:
            console.log('0010');
            break;
         case 3:
            console.log('0011');
            break;
         case 4:
            console.log('0100');
            break;
         case 5:
            console.log('0101');
            break;
        default:
            console.log('数据不合法');
    }

</script>
</html>